package com.ds.infrastructure.hyperspace.console.entity.enums;

public interface TbEnvironmentEnum {
    /**
     * 使用状态
     */
    enum USAGE_STATE {
        YES(1, "正常"),
        NO(2, "关闭");

        public final Integer code;
        private final String desc;

        USAGE_STATE(Integer code, String desc) {
            this.code = code;
            this.desc = desc;
        }

        public static USAGE_STATE toEnum(int value) {
            for (USAGE_STATE item : USAGE_STATE.values()) {
                if (item.code == value) {
                    return item;
                }
            }
            return null;
        }

    }
}
